package com.poetry.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@TableName("history")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class History {
    @TableId(type = IdType.AUTO)
    private Integer id;

    private Integer userId;

    /**
     * 浏览诗词
     */
    private Integer poemId;

    /**
     * 最近浏览时间
     */
    private LocalDateTime viewedAt;

    private LocalDateTime createTime;

    @TableField(exist = false)
    private String poemTitle;

    @TableField(exist = false)
    private String author;

    @TableField(exist = false)
    private String dynasty;
}
